#include "Light.h"

namespace Nezha
{

	Light::Light(LightType lt, const _string& name)
		:SceneNode(name)
		,mLitType(lt)
		,mConstant(1.0f)
		,mLinear(0)
		,mQuadratic(0)
		,mIntensity(1.0f)
		,mAngle(NZ_PI)
		,mCosine(0)
		,mSine(0)
		,mExponent(0)
		,mColor(RGBA::WHITE)
	{
	}

	void Light::setAngle(float angle)
	{
		NZ_ASSERT(0 < angle && angle <= NZ_PI);

		mAngle = angle;
		mCosine = Cos(angle);
		mSine = Sin(angle);
	}

}//end namespace Nezha